<template>
  <div class="daichulitop">
      <pendingService @subFn="searchFn"/>
      <xia :searchList="list"/>
  </div>
</template>

<script>
import axios from 'axios'
axios.defaults.baseURL="http://localhost:8080/"
import pendingService from '../../components/Serve/pendingService.vue'
import xia from '../../components/Serve/xia.vue'
export default {
    components: {
        pendingService,
        xia,
    },
    created () {
      this.queryList()
      document.querySelector('body').setAttribute('style', 'background-color:#F2F7FB')
    },
    data () {
        return {
            list:[]
        }
    },
    methods: {
        // value,,value2,value3,value4,serviceName
        searchFn(value,value1,value2,value3,value4,username){
            // alert(value4[0])
            axios({
                url:'serve/getServeList',
                method:'GET',
                params:{
                serve_state:value,
                sign_organization: value1,
                sign_team:value2,
                serve_page:value3,
                staDate:value4[0],
                endDate:value4[1],
                user_name:username,                }
            }).then((res) => {
                this.list=res.data      //把值传到list里面
            })
        },

        
        queryList() {
            axios({
                url: "serve/getServeList",
                method: "GET",
            }).then((res) => {
                this.list = res.data; //把值传到list里面
                console.log("王帅龙"+res);
            });
        },
    }
}
</script>

<style>
    .daichulitop{
        width: 1150px;
        height: 1050px;
        background: white;
        margin: 20px auto;
        box-sizing: border-box;
        padding: 10px;
    }
</style>